// 未完成
const paginationBody=Behavior({
  data: {
    dataArray: [],
    total: null,
    noneResult: false,
    loading: false
  },

  methods: {
    init: function () {
      this.setData({
        dataArray: [],
        noneResult: false,
        loading: false
      });
      this.data.total = null;
    },

    addMore: function(dataArray){
      this.setData({
        dataArray: this.data.dataArray.concat(dataArray)
      })
    },

    getCurrentStart: function(){
      return this.data.dataArray.length;
    },

    setTotal: function(total){
      this.data.total = total;
      if(0==total){
        this.setData({
          noneResult: true
        })
      }
    },

    hasMore: function(){
      if(this.getCurrentStart()>=this.data.total){
        return false;
      }
      return true;
    },
    
    isLocked: function(){
      return this.data.loading;
    },

    locked: function(){
      this.setData({
        loading: true
      });
    },
    
    unLocked: function(){
      this.setData({
        loading: false
      });
    }
  }
});

export{
  // paginationBev
}